<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:mo="https://gitee.com/aun/Timo">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
    <link rel="stylesheet" th:href="@{/lib/zTree_v3/css/zTreeStyle/zTreeStyle.css}" type="text/css">
</head>
<body class="timo-layout-page">
    <div class="layui-card">
        <div class="layui-card-header timo-card-header">
            <span><i class="fa fa-bars"></i> 链接推广</span>
            <i class="layui-icon layui-icon-refresh refresh-btn"></i>
            <!--<a th:href="@{/system/user/export}"><i class="fa fa-download"></i></a>-->
        </div>
        <div class="layui-card-body">
            <div  class="layui-row timo-card-screen put-row">
                <div class="pull-right screen-btn-group">
                    <div class="btn-group-left">
                        <button class="layui-btn open-popup" data-title="添加链接" th:attr="data-url=@{/mains/expandCh/add}"  data-size="450,500" ><i class="fa fa-plus"></i> 添加</button>
                    </div>
                </div>
            </div>
            <div class="timo-table-wrap">
                <table class="layui-table timo-table">
                    <thead>
                    <tr>
                        <th class="timo-table-checkbox">
                            <label class="timo-checkbox"><input type="checkbox">
                                <i class="layui-icon layui-icon-ok"></i></label>
                        </th>
                        <th>渠道名</th>
                        <th>编号</th>
                        <th>位置</th>
                        <th>推广路径</th>
                        <th>总访问量</th>
                        <th>活跃人数</th>
                        <th>时间</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="item:${list}">
                        <td><label class="timo-checkbox"><input type="checkbox" th:value="${item.id}">
                            <i class="layui-icon layui-icon-ok"></i></label></td>
                        <td th:text="${item.channelName}"></td>
                        <td th:text="${item.ch}"></td>
                        <td th:text="${item.type}"></td>
                        <td th:text="${item.exUrl}"></td>
                        <td >
                            <span th:text="${item.pv}"></span>&nbsp;
                            <a class="open-popup" data-title="详情" th:attr="data-url=@{'/mains/expandCh/detail/pv/'+${item.type}+'/'+${item.ch}}"  data-size="375,260" href="#">详情</a>
                        </td>
                        <td >
                            <span th:text="${item.uv}"></span>&nbsp;
                            <a class="open-popup" data-title="详情" th:attr="data-url=@{'/mains/expandCh/detail/uv/'+${item.type}+'/'+${item.ch}}"  data-size="375,260" href="#">详情</a>
                        </td>
                        <td th:text="${item.dates}"></td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
<script th:replace="/common/template :: script"></script>
<script type="text/javascript" th:src="@{/js/plugins/jquery-3.3.1.min.js}"></script>
<script type="text/javascript" th:src="@{/lib/zTree_v3/js/jquery.ztree.core.min.js}"></script>
<script type="text/javascript" th:src="@{/js/timoTree.js}"></script>
<script type="text/javascript">
    var local = window.localStorage;
    // 树形菜单
    $.fn.selectTree({
        rootTree: '全部',
        onSelected: function(treeNode){
            local.setItem('deptTitle', treeNode.name);
        }
    });
</script>
</body>
</html>
